Virtual Extensible Local Area Network (VXLAN) may be used as a technology to dispose a virtual network on a physical network by encapsulating packets (see M. Mahalingam et al. “Virtual eXtensible Local Area Network (VXLAN): A Framework for Overlaying Virtualized Layer 2 Networks over Layer 3 Networks”, [online], August 2014, (searched on Nov. 11, 2015), Internet <https://tools.ietf.org/html/rfc7348>, for example).
FIG. 1 illustrates an example of communication in which encapsulation is used. Case C1 in FIG. 1 illustrates an example in which communication is made between a node 2a and a node 2b through Tunnel End Points (TEPs) 5. A TEP 5a is disposed in an apparatus in which the node 2a is operating or in the vicinity of the apparatus. A TEP 5b is disposed in an apparatus in which the node 2b is operating or in the vicinity of the apparatus. A network 15 is located between the TEP 5a and the TEP 5b. In this state, the node 2a transmits a packet P1 toward the node 2b. The destination address of the packet P1 is the address of the node 2b, and the source address of the packet P1 is the address of the node 2a. The packet P1 is forwarded from the node 2a to the TEP 5a. 
The TEP 5a prestores information on the forwarding of a packet destined for the node 2b to the TEP 5b. Upon receiving a packet P1, the TEP 5a converts the packet P1 into a packet P2 by adding an outer header, which is used for packet forwarding to the TEP 5b, to the packet P1. In the example in FIG. 1, a destination address in the outer header is the address of the TEP 5b, and a source address in the outer header is the address of the TEP 5a. The packet P2 is forwarded through the network 15 as a packet destined for the TEP 5b. 
Upon receiving the packet P2, the TEP 5b converts the packet P2 into the packet P1 by removing the outer header thereof. Since the TEP 5b forwards the packet P1 to the node 2b, the packet transmitted from the node 2a arrives at the node 2b. 
To provide a redundant path or assure a communication speed, a plurality of paths may be used in communication between apparatuses. Although, in case C1, paths are not illustrated in the network 15, a plurality of paths may also be used to duplicate a path used in communication involving encapsulation. Case 2C illustrates an example in which a path used in communication involving encapsulation is duplicated. In case C2, the TEP 5a is disposed in a server 25a and the TEP 5b is included in a server 25b. The server 25a includes a virtual machine that operates as the node 2a, and the server 25b includes a virtual machine that operates as the node 2b. As illustrated in case C2, a path R1 passing through a switch 20a, a switch 20c, and a switch 20d, and a path R2 passing through the switch 20a, a switch 20b, and the switch 20d are used as communication paths between the server 25a and the server 25b. In this case, values set in the outer header in an encapsulated packet are used to determine which of the path R1 and path R2 is to be used as a path from the TEP 5a to the TEP 5b. For example, media access control (MAC) addresses, a virtual local area network (VLAN) ID, Internet protocol (IP) addresses, port numbers, and the like in the outer header are used to determine a path. The method of setting these items will be described below with reference to FIG. 2.
FIG. 2 illustrates an example of an encapsulated packet. In the description below, a header in a packet to which an outer header has yet to be added, like the packet P1 illustrated in FIG. 1, will be referred to as an inner header. That is, a packet that has yet to be encapsulated has an inner header and a payload. FIG. 2 is an example of a packet that has been encapsulated in a system in which VXLAN is used. In the packet in FIG. 2, an Ether header, an IP header, a User Datagram Protocol (UDP) header, and a VXLAN are included in an outer header. The Ether header includes a destination MAC address (DA), a source MAC address (SA), and a VLAN ID. The IP header includes a destination IP address (DstIP), a source IP address (SrcIP), and protocol information. Protocol information is the type of a transport layer protocol. In the example in FIG. 2, a value indicating UDP is set as protocol information. The UDP header includes a destination port number (DstPort), and a source port number (SrcPort). FIG. 2 just illustrates an example; Transmission Control Protocol (TCP) may be used as the transport layer protocol.
Since the TEP 5a transmits a packet to the TEP 5b to transmit the packet to the last destination specified in the inner header, the destination address in the Ether header and IP header is set at the address assigned to the TEP 5b. The destination port is set at a port number used, in the TEP 5b, in the processing of a packet destined for the node 2b. The source port number is set at a hash value calculated from information of the inner header.
When a path is to be determined by using switches 20, the source port number set in the outer header is used. Therefore, when the source port number is changed depending on the inner header of the packet as illustrated in FIG. 2, a load applied when there are a plurality of packet forwarding paths is distributed.
As a related technology, an edge router is proposed that registers flow information about packets forwarded from a user network to a provider network, and monitors the communication state of each flow registered, with reference to information about packets forwarded from the provider network to the user network (see Japanese Laid-open Patent Publication No. 2006-86889, for example).